package com.kevin.springcloud;

import com.kevin.springcloud.util.SpringContextHolder;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

/**
 * @author xijinlong
 * @date 2020-08-22 16:51
 */

@SpringBootApplication
@MapperScan(basePackages = {"com.kevin.springcloud.dao"})
@Slf4j
@EnableEurekaClient
@EnableDiscoveryClient
public class PaymentMain {

    public static void main(String[] args) {
        SpringApplication.run(PaymentMain.class, args);
        ServerProperties bean = SpringContextHolder.getBean(ServerProperties.class);
        log.info(PaymentMain.class.getSimpleName() + bean.getPort()+ " is success!");


    }

}


